<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<script>
		//用*打印倒直角三角形(5,4,3,2,1)
		/*for(var i=0;i<5;i++){
			for(var k=1;k<=5-i;k++){
				document.write('*');
			}
			 document.write('<br/>');
		}*/

		//等腰三角形
		for (var i=1;i<=5;i++){
        	for (var k=4;k>=i;k--){
          	document.write('&nbsp');
        }for(var d=1;d<=2*i-1;d++){
        	document.write('*');
        }
         document.write('<br/>');
    	}
	</script>
</head>
<body>
	
</body>
</html>